POV-Ray : Newsgroups : povray.binaries.images : Afghan highlands - problems with mesh2 : Re: Afghan highlands - problems with mesh2 Server Time
2 Nov 2024 12:20:50 EDT (-0400)
  Re: Afghan highlands - problems with mesh2  
From: Alain
Date: 20 Nov 2010 14:42:52
Message: <4ce824bc@news.povray.org>

> High!
>
> Resuming my long-cherished Khyberspace project, I once more started downloading
> SRTM radar elevation data tiles and converting them into PNG 16-bit
> heightfields.
> For performance reasons, I pre-created the huge mesh2 code to be read in by the
> scene script proper (as the mesh2 code is some 120 MB large, I just included
> here the PNG heightfield and the mesh2writer script rather than the mesh2
> itself).
>
> When I render the scene, two problems occur:
>
> First, between most of the mesh2 triangles, ugly black gaps show up (see
> attached image file - no, it's NOT a anti-aliasing issue, the very scene you see
> was rendered using +a0.3!). I remember that problem from back in 2005, when I
> also tried a Khyberspace scene from SRTM data, and back then, I was told by Mike
> Williams (if my notes are right) that it has got something to do with floating
> point accuracy. So I got the suggestion to define each vertex of the mesh2 as
> close to the origin as possible and then to re-translate the whole mesh.
>
> But when I looked up the old script from 2005, I found that the I wrote back
> then was a true Heath Robinson contraption, much too complicated to make use of
> it now, so I did not implement Mike William's solution up to now.
>
> The second problem is that whenever I give Earth rotation angles other than 0
> (or include the axial tilt), the mesh2 is rotated "out of sight" for the trace()
> vector to place the camera on the surface - though in the definition of the
> mesh2, all vertices are defined with respect to the origin (as you might look up
> in mesh2writer.pov)! So when I try to render such a scene, I just get empty
> black space...
>
> Any suggestion how to fix that?
>
> See you in Khyberspace!
>
> Yadgar
>
>

Did you try applying the rotations before translating to the final location?
If you translate then rotate, the mesh will orbit around the origin.
You may also use min_extent() and max_extent() to locate the final 
location of the mesh and trace accordingly.


Alain


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.